<%--
  Created by IntelliJ IDEA.
  User: Mr.Li
  Date: 2021/1/5
  Time: 17:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>主页信息</title>
</head>
<body>
<table border="1" align="center">
    <tr><td colspan="20"><h1>查用户信息</h1></td></tr>
    <tr>
        <td>id</td>
        <td>编码</td>
        <td>名称</td>
        <td>密码</td>
        <td>邮箱</td>
        <td>信息</td>
        <td>创建者</td>
        <td>创建时间</td>
        <td>修改者</td>
        <td>修改时间</td>
        <td>
            操作
            <a href="${pageContext.request.contextPath}/user/adddo">添加</a>
        </td>
    </tr>
    <c:forEach items="${pageUtil.lists}" var="user">
        <tr>
            <td>${user.id}</td>
            <td>${user.devCode}</td>
            <td>${user.devName}</td>
            <td>${user.devPassword}</td>
            <td>${user.devEmail}</td>
            <td>${user.devInfo}</td>
            <td>${user.createBy}</td>
            <td><fmt:formatDate value="${user.creationDate}"/></td>
            <td>${user.modifyBy}</td>
            <td><fmt:formatDate value="${user.modifyDate}"/></td>
            <td>
                <a href="${pageContext.request.contextPath}/user/selone/${user.id}">修改</a>
                <a href="${pageContext.request.contextPath}/user/delete/${user.id}">删除</a>
            </td>
        </tr>
    </c:forEach>
    <tr align="center">
        <td colspan="20">当前页[${pageUtil.pageindex}/${pageUtil.pagecount}]
            <c:if test="${pageUtil.pageindex>1}">
                <a href="${pageContext.request.contextPath}/user/getPage?pageIndex=1">首页</a>
                <a href="${pageContext.request.contextPath}/user/getPage?pageIndex=${pageUtil.pageindex-1}">上一页</a>
            </c:if>
            <c:if test="${pageUtil.pageindex<pageUtil.pagecount}">
                <a href="${pageContext.request.contextPath}/user/getPage?pageIndex=${pageUtil.pageindex+1}">下一页</a>
                <a href="${pageContext.request.contextPath}/user/getPage?pageIndex=${pageUtil.pagecount}">尾页</a>
            </c:if>
        </td>
    </tr>
</table>
</body>
</html>
